C[x](ub[u], {
    xd: function() {
        this.z && this.kd(this.z)
    },
    initialize: function(a) {
        nb[u].initialize.call(this, a);
        this.Ya();
        this.fh();
        this.L(a);
        return this.A
    },
    L: function(a) {
        var b = this;
        a[B]("load", 
        function() {
            b.fh()
        });
        a[B]("moveend", 
        function() {
            b.fh()
        });
        a[B]("zoomend", 
        function() {
            b.fh()
        });
        a[B]("maptypechange", 
        function() {
            b.A && (b.A.style.color = b.z.ba().Ti())
        })
    },
    Ya: function() {
        nb[u].Ya.call(this);
        C.w.Za(this.A, "BMap_cpyCtrl");
        var a = this.A.style;
        a.cursor = "default";
        a.whiteSpace = "nowrap";
        a.MozUserSelect = "none";
        a.color = this.z.ba().Ti();
        a.background = "none";
        a.font = "11px/15px " + J.fontFamily;
        nb[u].kk.call(this)
    },
    fh: function() {
        if (this.z && this.A && 0 != this.Na[w]) for (var a = 0, b = this.Na[w]; a < b; a++) {
            this.z.ha();
            var c = this.z.Ma({
                x: 0,
                y: 0
            }),
            d = this.z.Ma({
                x: this.z[y],
                y: this.z[A]
            }),
            c = new La(c, d);
            if (this.Na[a].bounds && c.Ls(this.Na[a].bounds) == k) {
                if (this.A) for (d = 0; d < this.A.children[w]; d++) if (this.A.children[d].getAttribute("_cid") == this.Na[a].id && "none" != this.A.children[d].style.display) {
                    this.A.children[d].style.display = "none";
                    return
                }
            } else if (this.A) {
                for (var c = l, d = 0, e = this.A.children[w]; d < e; d++) if (this.A.children[d].getAttribute("_cid") == this.Na[a].id) {
                    c = f;
                    this.A.children[d].style.display = "inline";
                    this.A.children[d].innerHTML != this.Na[a].content && (this.A.children[d].innerHTML = this.Na[a].content);
                    break
                }
                c || this.ei(this.Na[a])
            }
        }
    },
    xk: function(a) {
        if (a && Fa(a.id) && !isNaN(a.id)) {
            var b = {
                bounds: k,
                content: ""
            },
            c;
            for (c in a) b[c] = a[c];
            if (a = this.lg(a.id)) for (var d in b) a[d] = b[d];
            else this.Na.push(b);
            this.fh()
        }
    },
    lg: function(a) {
        for (var b = 0, c = this.Na[w]; b < c; b++) if (this.Na[b].id == a) return this.Na[b]
    },
    qo: o("Na"),
    gp: function(a) {
        for (var b, c = 0, d = this.Na[w]; c < d; c++) this.Na[c].id == a && (b = this.Na.splice(c, 1), c--, d = this.Na[w]);
        if ((a = this.Cc(a)) && a[ka]) a[ka][ga](a);
        this.fh();
        return b
    },
    ei: function(a) {
        this.A && (this.A.innerHTML += "<span _cid='" + a.id + "'>" + a.content + "</span>")
    },
    Cc: function(a) {
        var b = nb[u].Cc.call(this);
        if (eb(a)) {
            if (b) for (var c = 0, d = b.children[w]; c < d; c++) if (b.children[c].getAttribute("_cid") == a) return b.children[c]
        } else return b
    }
});
Z(Zc, {
    addCopyright: Zc.xk,
    removeCopyright: Zc.gp,
    getCopyright: Zc.lg,
    getCopyrightCollection: Zc.qo
});